Skip to content

feat(db): support .sql.gz seed files with automatic decompression#5105

Closed
Basavaraj8143 wants to merge 1 commit into
supabase:developfrom
Basavaraj8143:feat/sql-gz-seed
Closed

feat(db): support .sql.gz seed files with automatic decompression#5105
Basavaraj8143 wants to merge 1 commit into
supabase:developfrom
Basavaraj8143:feat/sql-gz-seed

Conversation

@Basavaraj8143

Copy link
Copy Markdown

Summary

This PR adds support for gzipped seed SQL files (.sql.gz) during database seeding.

What’s included

  • Auto-detect .sql.gz seed files by extension.
  • Decompress gzipped SQL before parsing/executing.
  • Reuse the same path for seed hashing so change detection works for compressed seeds.
  • Add tests for:
    • pending gzipped seeds
    • seeding from gzipped seed files
    • seeding globals from gzipped files
  • Update docs/config comments to mention .sql.gz support.

Why

Large seed files are common in DB-first workflows. Compressed seed files reduce repo/storage size while keeping db reset/seed automation intact.

Backward compatibility

  • Existing .sql behavior is unchanged.
  • .sql.gz is additive and auto-detected from extension.

@Basavaraj8143 Basavaraj8143 requested a review from a team as a code owner April 20, 2026 05:16
@Basavaraj8143

Copy link
Copy Markdown
Author

Hi maintainers, just checking if someone could take a look when available. Happy to make any changes if needed.

1 similar comment
@Basavaraj8143

Copy link
Copy Markdown
Author

Hi maintainers, just checking if someone could take a look when available. Happy to make any changes if needed.

@jgoux

jgoux commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Hey, thanks for your contribution! 🙏

I took the basis of what you did and opened a PR which is up-to-date with our default branch changes here.

I'm closing this PR, thanks again for addressing the issue!

@jgoux jgoux closed this Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants